import Vue from 'vue'
import Router from 'vue-router'
import Login from '@/pages/login'
import Index from '@/pages/index'
import Add from '@/pages/index_add'
import About from '@/pages/about'
Vue.use(Router)

export default new Router({
  routes: [
    {
      path: '/',
      name: 'Login',
      component: Login
    },
    {
       path: '/login',
      name: 'Login',
      component: Login   	
    },
    {
      path:'/index',
      name:'Index',
      component:Index,
      meta: {
          requireAuth: true, 
      },
    },
    {
      path:'/add',
      name:'Add',
      component:Add,
      meta: {
          requireAuth: true, 
      },
    },
    {
      path:'/about',
      name:'about',
      component:About,
    },
  ]
})
